fix(router-timelock): add getters, tests, and doc fixes - #927
Merged
Maki-Zeninn merged 2 commits intoJul 26, 2026
Merged
Conversation
- Add test_get_op_nonexistent_returns_none to verify get_op returns None for an unknown op_id, closing the regression gap against accidental unwrap() or default-value fallback (closes Maki-Zeninn#879) - Add get_dependencies(op_id) public getter that reads DataKey::Deps and returns an empty Vec when no deps exist, enabling tooling and UIs to query dependency chains without internal storage access; add three tests covering the stored-deps, no-deps, and nonexistent-op cases (closes Maki-Zeninn#880) - Add get_max_pending_ops() getter mirroring min_delay(), exposing the MaxPendingOps limit set at initialize time; add test_get_max_pending_ops_returns_initialized_value alongside the existing QueueFull tests (closes Maki-Zeninn#881) - Add ops_cleaned and admin_transferred to the module-level event doc comment so the list matches all events the contract emits (closes Maki-Zeninn#882)
|
@ochemegina-ai Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
closes #879
closes #880
closes #881
closes #882
Add test_get_op_nonexistent_returns_none to verify get_op returns
None for an unknown op_id, closing the regression gap against
accidental unwrap() or default-value fallback (closes docs(router-timelock): module-level events list omits ops_cleaned and admin_transferred #879)
Add get_dependencies(op_id) public getter that reads DataKey::Deps
and returns an empty Vec when no deps exist, enabling tooling and
UIs to query dependency chains without internal storage access;
add three tests covering the stored-deps, no-deps, and nonexistent-op
cases (closes feat(router-timelock): add get_max_pending_ops() view function #880)
Add get_max_pending_ops() getter mirroring min_delay(), exposing
the MaxPendingOps limit set at initialize time; add
test_get_max_pending_ops_returns_initialized_value alongside the
existing QueueFull tests (closes feat(router-timelock): add get_dependencies(op_id) view function #881)
Add ops_cleaned and admin_transferred to the module-level event
doc comment so the list matches all events the contract emits
(closes test(router-timelock): add test asserting get_op returns None for a nonexistent op_id #882)